#ifndef TIMETOOL_H
#define TIMETOOL_H

#include <QObject>
#include <QDateTime>

#define DAT_SECONDS_COUNT 86400

class TimeTool : public QObject
{
    Q_OBJECT
public:
    explicit TimeTool(QObject *parent = nullptr);

    static int getTodayStartTimestamp() {
        QDateTime currentTime = QDateTime::currentDateTime();
        int currentTimestamp = currentTime.toTime_t();
        int dayCount = (currentTimestamp / DAT_SECONDS_COUNT);
        return (dayCount * DAT_SECONDS_COUNT);
    }

signals:

};

#endif // TIMETOOL_H
